<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>公告预览</title>
    <link rel="stylesheet" href="./css/reset.css">
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js"></script>

    <style>
        #notice{
            padding: 20px;
        }
        h3,.notice_time{text-align: center;}
        html,body{
            overflow: auto;
        }
    </style>

</head>
<body>
    <div id="notice">
        <h3>{{preview.title}}</h3>
        <p class="notice_time mt10"><small>{{preview.noticeTime}}</small></p>
        <div class="notice_content mt20" v-html="preview.content">
        </div>
    </div>
 <script>
      new Vue({
          el:'#notice',
          data(){
              return {
                preview:{}
              }
          },
          mounted(){
              this.initNotice();
          },
          methods:{
              initNotice(){
                  let preview=sessionStorage.getItem('preview');
                   if(preview!=null){
                    this.preview=JSON.parse(preview);
                   }
              }
          }
      })
 
 
 
 </script>

</body>
</html>